package com.gml.design.other.abstractfactory;

/**
 * @ClassName : Main
 * @Description : 运行类
 * @Author : gml
 * @Date: 2021-04-06 17:24
 */
public class Main {

    public static void main(String[] args) {
        Car car = new Car();
        car.go();

        AK47 ak47 = new AK47();
        ak47.shoot();

        Bread bread = new Bread();
        bread.printName();

        AbstractFactory factory = new ModernFactory();
        factory.createVehicle().go();
        factory.createWeapon().shoot();
        factory.eatFood().printName();
    }

}
